package de.hs_fulda.SoftComputing.Gogol.Wasserkraft;

import java.awt.FlowLayout;
import java.awt.image.BufferedImage;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class VarPanel extends JPanel {
  
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
  public VarPanel () {
  super(new FlowLayout(), true);
    
  }
  public void addPicture (BufferedImage image, String toolTip) {
    JLabel picHolder;
    picHolder = new JLabel();
    picHolder.setToolTipText(toolTip);
    add(picHolder);
    picHolder.setIcon(new ImageIcon(image));
    //picHolder.setBounds(0, 0, 800, 600);
    picHolder.setEnabled(true);
   
  }
  public void updatePicture (BufferedImage image, int number) {
    JLabel picHolder;
    picHolder = (JLabel) getComponent(number);
    picHolder.setIcon(new ImageIcon(image));
  }
}
